﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Com.Maiyoule.GsmSms {
    public interface IEvent {
        /// <summary>
        /// 开始打开短信猫
        /// </summary>
        void OnStartOpen();
        /// <summary>
        /// 打开成功
        /// </summary>
        void OnOpenSuccess();
        /// <summary>
        /// 打开失败
        /// </summary>
        void OnOpenFaild();
        /// <summary>
        /// 开始关闭短信猫
        /// </summary>
        void OnStartClose();
        /// <summary>
        /// 成功关闭短信猫
        /// </summary>
        void OnCloseSuccess();
        /// <summary>
        /// 关闭短信猫失败
        /// </summary>
        void OnCloseFaild();

        /// <summary>
        /// 开始发送
        /// </summary>
        void OnStartSend(Message message);
        /// <summary>
        /// 添加到发送队列结果
        /// </summary>
        /// <param name="result"></param>
        void OnSendQueued(Int16 result, Message message);

        /// <summary>
        /// 发送结果
        /// </summary>
        void OnSendResult(Int16 result, Message message);
        /// <summary>
        /// 发送完成
        /// </summary>
        void OnSendComplete(Message message);

        /// <summary>
        /// 队列发送完成
        /// </summary>
        void OnQueuedComplete();

        /// <summary>
        /// 获取到中心号码结果
        /// </summary>
        /// <param name="result">中心号码</param>
        void OnMessageCenterNumber(string result);
        /// <summary>
        /// 获取设备数据信息
        /// </summary>
        /// <param name="reuslt">数据结果</param>
        void OnMachineNumber(string result);

        /// <summary>
        /// 开始删除短信
        /// </summary>
        /// <param name="index">短信索引</param>
        void OnStartDeleteMessage(int index);
        /// <summary>
        /// 成功删除短信
        /// </summary>
        /// <param name="index">短信索引</param>
        void OnDeleteMessageSuccess(int index);
        /// <summary>
        /// 删除短信失败
        /// </summary>
        /// <param name="index">短信索引</param>
        void OnDeleteMessageFaild(int index);

        /// <summary>
        /// 开始读取短信
        /// </summary>
        /// <param name="index">短信索引</param>
        void OnStartReadMessage(int index);
        /// <summary>
        /// 读取的短信结果
        /// </summary>
        /// <param name="index">索引</param>
        /// <param name="phone">接收号码</param>
        /// <param name="content">内容</param>
        /// <param name="time">时间</param>
        void OnReadMessage(int index, string phone, string content, DateTime time);

        /// <summary>
        /// 新短信提醒
        /// </summary>
        void OnNoticeMessage(int index);

        /// <summary>
        /// 短信列表结果
        /// </summary>
        /// <param name="type">短信类型</param>
        /// <param name="messagelist">短信列表</param>
        void OnMessageList(Int16 type, List<Message> messagelist);
        /// <summary>
        /// 开始读取短信列表
        /// </summary>
        /// <param name="type">短信类型</param>
        void OnReadMessageList(Int16 type);
    }
}
